<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
	    <title></title>
	    <meta charset="utf-8">
	    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	    <link rel="stylesheet" href="../../skin/base.css">
	    <link rel="stylesheet" href="css/search_item.css">
	    <script src="../../js/zy_control.js"></script>
	    <script src="../../js/zy_click.js"></script>
	</head>
	<body>
		<div id="main">
			<header>
				<strong><script>document.write(localStorage['apps_express_title']);</script></strong>
				<div>运单号：<script>document.write(localStorage['apps_express_nu']);</script></div>
			</header>
			<section id="content"></section>
			<footer>
				<span>本应用数据来自“爱查快递”</span>
			</footer>
		</div>
	</body>
	<script>
	zy_init();
	function getMain(t){
		
		$$('content').className='load';
		var url = 'http://app.578.cn/express/data.php';
		uexXmlHttpMgr.open(t,'post',url,"8000");
		uexXmlHttpMgr.setPostData(t,'0','com',localStorage['apps_express_com']);
		uexXmlHttpMgr.setPostData(t,'0','nu',localStorage['apps_express_nu']);
		uexXmlHttpMgr.send(t);
	}
	window.uexOnload=function(type){
		if (!type){
			
			uexWindow.setBounce("1");
			uexWindow.setBounceParams("0",'{"imagePath":"res://loading.png","textColor":"#666","levelText":"","pullToReloadText":"拖动刷新","releaseToReloadText":"释放刷新","loadingText":"加载中，请稍等"}');
            uexWindow.showBounceView("0","#f3f3f3","1");
            uexWindow.notifyBounceEvent("0","1");
			
			uexWindow.onBounceStateChange=function(t,s){
	　　　　　　	if(t=="0"){
	　　　　　　　　	if(s=="2"){
						getMain(t);
					}
	　　　　　　	}
	　　　　	}
			
			uexXmlHttpMgr.onData = function(opId, status, data){
				if(status==1){
					$$('content').className='';
					
					if(opId<1){					
						uexWindow.setBounceParams("0",'{"imagePath":"res://loading.png","textColor":"#666","levelText":"上次更新：'+Now()+'","pullToReloadText":"拖动刷新","releaseToReloadText":"释放刷新","loadingText":"加载中，请稍等"}');
					}
					uexXmlHttpMgr.close(opId);
					uexWindow.resetBounceView(opId);
					data = JSON.parse(data);
					
					if (data['status'] == 0) {
						$$('content').innerHTML='<strong>'+data['message']+'！</strong>';
					}else{
						if(data['errCode'] > 0){
							$$('content').innerHTML='<strong>'+data['message']+'！</strong>';
						}else{
							data=data['data'];
							var Html='';
							for(var i=0;i<data.length;i++){
								Html+='<div><time>'+data[i]['time']+'</time><pre>'+data[i]['context']+'</pre></div>';
							}
							$$('content').innerHTML=Html;
						}
					}
					
					
				}else if(status ==-1) {//加载失败
					uexXmlHttpMgr.close(opId);
					uexWindow.resetBounceView(opId);
					uexWindow.toast("0","5",'加载失败',1000);
				}
			}

			getMain(-1);
		}
	}
	</script>
</html>